#!/bin/bash

echo "=========================================="
echo "   小型数据库系统 - 工作流程演示"
echo "=========================================="
echo ""

echo "📝 演示SQL语句:"
echo "CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(50) NOT NULL, age INT);"
echo "INSERT INTO users VALUES (1, 'Alice', 25);"
echo "SELECT * FROM users WHERE age > 20;"
echo ""

echo "🔍 1. Python词法分析结果:"
cd /Users/zhangpeng/Desktop/150
python3 sql_compiler/lexer.py | head -20

echo ""
echo "🌳 2. Python语法分析结果:"
cd /Users/zhangpeng/Desktop/150/sql_compiler
python3 parser.py

echo ""
echo "💾 3. C++文件管理器演示:"
cd /Users/zhangpeng/Desktop/150/storage_system_cpp
make clean > /dev/null 2>&1
make > /dev/null 2>&1
./test_file_manager

echo ""
echo "=========================================="
echo "   系统工作流程: SQL → 词法分析 → 语法分析 → AST → 存储"
echo "=========================================="
